Fixed implementation issues. #499