fixes from codestreamer at https://bugs.flyspray.org/task/1911