Fix misuse of __weak resulting in commands being freed before they were used