fixed bug causing cd error