Shooting suspect was able to buy two guns despite mental illness