Making some slight modifications so that things actually work correctly