Implemented get_parent_bitmap, fixed type casts