Fix for two small issues

#547
and
#546