Fix wrong check when adding hash fragment

Doing wrong check when adding new hash fragment in extention method.