New information: somehow K2 has conflict with Landing Page Designer Component. The error only occurs when I am logged in as a user. When I am not logged in it works fine. When I comment out line #65 in utilities.php works all the time but I lose k2 author images.