If i activate my security code when i flashed my phone. On first boot it will asked for it. When i enter my lock code, it gives me error. But, that code become my new lock code.
As for hard reset have you tried with vol up or down or nokia 500 doesn't have it also.