Fixed img16 bugs