fix proof of work check