fix decorator bug -- resolves #2886
code style update