Sub extension fix

Sorry I tried to clean the history using rebase but I made a mess instead.
If you have any idea how to fix this and explain me what I did wrong I would really appreciate it.