fixed a bug in lagk