fixes #6 and removes errors introduced in 7a03f3f59e