fix a bug in positioning