Updates to make activeUserDir slicing work properly

As described in ticket #6. All credits go to wizche for finding and providing a fix for the bug.