Code Lock help?

I can unlock key locks no problem but I can't unlock a code lock. It says that I opened it with master lock but it's still locked. I have all of the permissions. Am I screwed up or is there something in the coding that doesn't allow unlocking code locks?

I will investigate and see if there are issues