Squashed commit of the following:

commit 6e1abba198726b949d36b967ff4ed2aa3dc33b1b
Author: Marc Bonsels <marc.bonsels@otrs.com>
Date:   Fri May 31 10:39:55 2013 +0200

    Added setTimeout() call in order to avoid crashes on iOS.