Bug and scope fixes
0.5.4