Fix small bugs preventing execution