Fixing issue #87

I left a couple of comments in the code. Feel free to change what you want. Hope you like it.