quick fixes for bug mentioned in forum