fixed bug, please review