Tmobile SG S2 Software problem or power button

view story

http://forum.xda-developers.com – MY galaxy s2 has problems with powering off every now and then. it was really bad at one point where all it was doing is turning on and rebooting right after. i had a custom rom for months and never had problems until yesterday. i couldnt go on recovery mode because it would always restart every five seconds. Now it seems to less frequent because i realized that it always reboots when i touch the power button once. Sometimes when i push the power button to take it off sleep mode, the power options pops up (recovery, restart, power off etc) so thats when i thought the power button might be the (HowTos)