Fix bug related to spring security