Fixed an implementation bug