Texas legislature fails on abortion, passes masturbation bill