Fix encoding bug, add right click functionality