Fixed debug log message.
Added casts in order to make android build successful.