Correcting an issue from mcphargus. Tests are welcome