fixing custom error's inheritance from Error object