Fixed stackoverflowexception