Fixed problem with createNewFlat