Added assertion for errors but confused why there are 2