fixed bug with pyramid positioning