fixed bugs, now sending mails after creating