Fixed write_dir/button events/bitmap methods.