Small fix converting from double to int