Fixing 'values not allowed' errors