Correction of bugs. Should compile

No comment.