Modifications to fix bug with using self in completion block