Fixed type in -run and made some changes to -build