Fixed #58, replaces old #a7458e1d829c8514c2b21b5510bda096a8df17eb