Fixed null to 1 in order to prevent postgresql error