Some fixes, now it works

Change-Id: Ia8b2c7de7ada8a7445d01ad9bddf245a46e88084