bring fixes like in paranoidandroid

Change-Id: I0e9f1ee0534055e7ecdd13b833a323db3a4852ba