Fixes str to int conversion