ok, I'll answer my own question since i found it on apples webb page. It can apperently take up to 30 seconds for the sleep function to kick in if you have programs that need to shut down. So I tried and it worked even tough it took a little bit more than 30 seconds..