Add missing cast, fix warning.

Fix not-reachable warning.
Fix missing cast to LONG.