class cast exception fixed