bug fix (thanks Jaewon Jung)