Fixed Android compilation

+ Microfixes:
removed redundant cast
fixed copy-paste based typo "looped" => "reversed"