fix bug and use relative layout