fixes to transform (was back to front)