Fixed several bugs with creating data