Fixed problems with code.