Fixed an incomplete piece of code