Fixed second part of issue #268