Fix #229, thanks to @serkandaglioglu for reporting.