Added Tests and handler fix