Specifications and bug fix