Fixing int conversion