str to int bugfix