fixed multiple bugs with building process