Fixed id bug, added ticket validation