[Misc] Removed unnecessary cast
[Misc] Improved warning log message