In Settings > Location and Security > Timeout: make sure this is set to immediately if you are trying to make the phone lock without having to hit the lock button manually. I have mines to 30 seconds, seems ample enough time if Im texting back and forth.
Hope this is what you were talking about.