fixed bug in registration leading to an exception
fixed dependency scope problem