Fix for #58

This is not tested on a mac yet. It seems like it is not breaking anything on my Linux box, but Mac-specific testing is necessary to validate this one.