removing a bug with debug argument