association bug fixed for postgres