Fixed issue 31. Thanks to Jeswang