fixed adding planes to the database