Fixed some runtime exceptions