fixed bug with orientation