Bug fixes for anchor class