Minor improvement in Problem code