Make sure custom values can be used

Changed if statements so they aren't used every time.