added top and left locking
Bug fix