Fixed bug #2

Exception "variable 'now' referenced before assignment"
Fixed problem with profile id