fixed a minor bug in last commit