Registration fix; fixed#40