Fixed a bug with the placing of objects