Changed onResume() method. Hopefully a bug fix.