fixed fatal error on creating a new item