long overdue fix of several issues