bugfix: setFrame might be called before the init function, resulting in an infinite loop