fixed programming bug