Fix few bugs in executable