Added tests to Sub + fixed a bug