fix custom input to prevent negative/float errors