z position of rails corrected