Finally fixed the session bug, was overwriting session variable accidentlly.