Fixed several bugs and added special support for knocking.