fpga changes for better locking