fixed #81 see comments for more