bug fix for server side