fixed bug
Fixed bug and added server-side resource support