fix #90 based on forum post by @bigevilbrain (http://bit.ly/1lZig4M)