Fixed a bug in the opk loading function