fixed bug with center being null