fixed bug in commit 7f7be17