Fixes issue #1036

Actually, I'm not sure why the `if` block is not indented... Probably an Android Studio fail.. :(