Fixes potential error with input