Bug fix

Change-Id: I9cda9371a228074ed60eb367806e2d35f8a02d5f
Working on tests

Change-Id: Icced3c2dd53db8a54d1f07e2247a3951971abd05