Removed useless code
Fixed trigger not returning anything under some circumstances