Resolve warning about double to int data loss