Fix input overflow