Fixed unit testing bug