change behaviour to match Javadoc