MacBook does not sleep when closed
I have a Late 2013 Retina Macbook Pro running Mavericks. Sometimes when I close the lid, it does not sleep or turn off the display, even after the set time in Energy Saver preferences. My main concern is that I have my security settings set to lock my computer 5 seconds after sleep/turning off the display, and this does not happen, as it does not go to sleep. The only way I notice is that when I open the computer some time later, the screen is already on and it is not locked. There are no periphials connected when this happens.
MacBook Pro (Retina, 13-inch, Late 2013), OS X Mavericks (10.9.2)