Fixed a coupled of issues