Fix create query