fix up logics + some errors

This is now tested to be fully working on the LG D801

have fun ;)