Fix possible crash on nexus (negative numbers)