fixed layers using session just in controller instead of using it in service