Fix for issues 114 and 48