Fixed bug in test so it can be ran separately