fixed #288 and guard