Finishing bug fix